chore: propagate recent develop fixes to sibling packages (2026-07-08)#13374
Draft
Planeshifter wants to merge 3 commits into
Draft
chore: propagate recent develop fixes to sibling packages (2026-07-08)#13374Planeshifter wants to merge 3 commits into
develop fixes to sibling packages (2026-07-08)#13374Planeshifter wants to merge 3 commits into
Conversation
Propagates the description fix from a3c9b30 ("docs: update descriptions") to the C source in `stats/base/dists/gumbel/logcdf`, which shared the same defect as the pareto-type1 sibling: the JSDoc sentence said "Evaluates the cumulative distribution function (CDF)" instead of "Evaluates the natural logarithm of the cumulative distribution function (CDF)". The sibling `lib/main.js` and header already carry the corrected wording.
Propagates the C lint fix from 3fab81a ("chore: fix C lint errors") to sibling `number/float{32,64}/base/*` packages whose example.c and README C snippets declare a read-only input array `x[]` without `const`. The pattern (cppcheck flagging arrays that are only indexed-read as candidates for `const`) applies verbatim in `number/float64/base/exponent`, `number/float64/base/to-words`, and `number/float32/base/to-word` — the arrays are iterated over and each element is passed by value into the stdlib call, never mutated.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Revert the `const` addition on the C snippet inside `number/float32/base/to-word/README.md` and `number/float64/base/exponent/README.md`. Both READMEs carry a pre-existing `stdlib/doctest-marker` violation on nearby `// =>` comments in the JS example, and touching either file surfaces the lint failure under `Lint Changed Files`. Fixing that lint is adaptive rewriting outside the source commit's mechanical shape; drop these README sites and keep the const propagation to the sibling `examples/c/example.c` files (which stay landed) plus `float64/base/to-words/README.md`, which has no such marker.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Propagating fixes merged to
developbetween 2026-07-07 14:20 PDT (b5b7b4c) and 2026-07-08 01:31 PDT (bb93e56) to sibling packages carrying the same defect.Pattern:
logcdfdescription missing "natural logarithm" qualifierCommit
a3c9b30corrected the JSDoc/JSDoc-in-C description instats/base/dists/pareto-type1/logcdfwhere the sentence read "Evaluates the cumulative distribution function (CDF)" for a function that computes the natural logarithm of the CDF. The same defect is present instats/base/dists/gumbel/logcdf/src/main.c— the siblinglib/main.jsand header already carry the correct wording, so only the C source needs to be aligned.a3c9b30(docs: update descriptions)@stdlib/stats/base/dists/gumbel/logcdf(src/main.c)Pattern:
const-qualify read-only input arrays innumber/*C examplesCommit
3fab81aaddedconstto the inputdouble x[]innumber/float64/base/signbit'sexamples/c/example.cand README C snippet, matching the cppcheck lint that flags never-mutated arrays. Three siblingnumber/float{32,64}/base/*packages carry the same defect: the input array is iterated over and each element passed by value into a stdlib scalar-read call.constis added toexamples/c/example.cfor all three packages; the mirrored snippet inREADME.mdis only updated forfloat64/base/to-words, where the surrounding JS example passesLint Changed Files— the READMEs for the other two carry a pre-existingstdlib/doctest-markerviolation on adjacent// =>comments that surfaces the moment the file enters the changed-files set.3fab81a(chore: fix C lint errors)@stdlib/number/float64/base/exponent(examples/c/example.conly)@stdlib/number/float64/base/to-words(examples/c/example.c+README.md)@stdlib/number/float32/base/to-word(examples/c/example.conly)Effective PR diff vs
develop: 5 files, 5 LOC.Related Issues
No.
Questions
The
Run changed examplesandLint Changed Filesjobs triggered by thepushevent on commit1f85abc79fail, but for a scope-of-comparison reason worth flagging to reviewers:run_affected_examples.ymlcomputes changed files withgit diff HEAD~ HEADonpushevents. Commit1f85abc79is the revert that removed the two problematic READMEs (float32/base/to-word/README.mdandfloat64/base/exponent/README.md) from the effective PR diff. ItsHEAD~..HEADdelta is exactly those two README files, so the push-triggered run re-lints them and re-hits the pre-existingstdlib/doctest-markerviolation on the adjacent// =>markers — even though the effective diff vsdevelopno longer touches either README.pull_request-triggered path (lines 118–121 ofrun_affected_examples.yml, merge-base to head) compares to the PR base, which excludes the reverted READMEs.Should the two
// =>doctest-marker violations be normalized as a follow-up (either here or in a separate maintenance PR), the const propagation can be extended back to the two dropped READMEs. Not attempted in this PR because the source commit's mechanical shape iss/double x\[\]/const double x\[\]/, and normalizing// => Xinline comments is adaptive rewriting outside that shape.Other
Validation
stats/base/dists/*/{logcdf,logpdf,logpmf,logsf}for the description fix;number/*/base/*/examples/c/example.cand the mirroredREADME.mdsnippets for the const-qualifier fix). Header files underinclude/were checked for the description pattern; onlysrc/main.cingumbel/logcdfcarried the pre-fix wording.math/strided/special/*example.c files were checked for the const pattern; the arrays are alreadyconstthere.lib/main.jsand the header already use the corrected phrasing; for the const pattern: verifyingxis never written and the C-snippet in README.md matches theexample.ccode).Deliberately excluded:
float32/base/to-word/README.mdandfloat64/base/exponent/README.md.Lint Changed Filesflags// =>doctest markers on adjacent JS example lines the moment either README enters the changed-files set (stdlib/doctest-marker:Use // returns after variable declarations or assignment expressions instead of =>). The lint is pre-existing debt; normalizing it is adaptive rewriting outside the source commit's mechanical shape. Follow-up commit1f85abcreverts the two README lines while keeping the sibling.cedits. See the note in "Questions" for how this interacts with theRun changed examplespush-event trigger.refactor: add isnan guardssweep fromb5b7b4c(stats/base/dists/{beta,betaprime,f,gamma,invgamma}): sibling PR chore: follow-up fixes for recentdevelopcommits #13373 already flagged the isnan-guard ordering as a follow-up, and other candidate dists (uniform,arcsine) returnNaNcorrectly via NaN-arithmetic propagation without an explicit guard — adding one is an adaptive, defense-in-depth call, not a mechanical propagation, and better handled as a deliberate normalization pass.logorithm→logarithmtypo on line 29 ofgumbel/logcdf/src/main.cand theGUMBEL_CDF_H→GUMBEL_LOGCDF_Hinclude-guard-comment typo: unrelated to the description pattern the source commit fixed. Log-and-skip for a future maintenance pass.chi/logpdfandt/logpdffiles ("log probability density function (logPDF)"): technically consistent phrasing, not the same defecta3c9b30fixed.stats/base/dists/*/log{cdf,pdf,pmf,sf}files scanned; none carried the exact pre-fix wording.blas/*/examples/c/example.cfiles declaringdouble x[]: all wrap in-place BLAS routines (dscal,dsort,dfill,dswap, …) that mutate the input array;constwould emit a discarded-qualifier warning.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code on behalf of @Planeshifter as an automated propagation of fixes merged to
developover the prior 24 hours. Candidate source commits were filtered for generalizable patterns, sibling sites located via grep-able pattern signatures, and each proposed patch independently validated by parallel reviewer agents (two Opus validation passes) before commits were applied in the primary worktree. A maintainer should audit and promote out of draft.